package com.silence.ByteDance;

// 兔生兔
public class easy_64 {
    public static long solution(int A) {
        // Edit your code here
        long[] size = new long[2];
        if (A == 1) {
            return 1;
        } else {
            size[0] = 0;
            size[1] = 1;
            for (int i = 2; i <= A; i++) {
                long now0 = size[0];
                long now1 = size[1];
                size[0] = now1;
                size[1] = now0 + now1;
            }

            return size[0] + size[1];
        }
    }

    public static void main(String[] args) {
        // Add your test cases here
        System.out.println(solution(5) == 8L);
        System.out.println(solution(1) == 1L);
        System.out.println(solution(15) == 987L);
        System.out.println(solution(50) == 20365011074L);
    }
}
